package com.yauthor.module.test{
	
	/**
	* UTOPIA ACTION event
	*/
	
	import flash.events.Event;
	import flash.net.URLVariables;
	
	public class UtopiaActionExternalEvent extends Event {
		
		/**
		 * commonly used action names 
		 */
		public static const SAVE_STATE:String = "save.state";
		
		public static const SUBMIT:String = "submit";
		
		public static const ALERT_YES:String = "alert.yes";
		
		public static const ALERT_NO:String = "alert.no";
		
		public static const ALERT_OK:String = "alert.ok";
		
		public static const WORD_DOUBLE_CLICK:String = "word.double.click";
		
		public static const EXIT:String = "exit";
		
		public static const TIME_OUT:String = "timeOut";
		
		/**
		 * event type
		 */
		public static const UTOPIA_ACTION_EXTERNAL:String = "UTOPIA_ACTION_EXTERNAL";
		
		/**
		 * name of an action to be performed
		 */
		public var action:String;
		
		public var data:URLVariables;
		
		public function UtopiaActionExternalEvent(act:String, bubbles:Boolean = true, data:URLVariables = null) {
			super(UTOPIA_ACTION_EXTERNAL, bubbles, false);
			
			this.action = act;
			this.data = data;
		}
		
		/**
		 * clone override
		 */
		override public function clone():Event {
			return new UtopiaActionExternalEvent(action, bubbles, data);
		} 		
		
		/**
		 * event description
		 */
		override public function toString():String {
			return "UtopiaActionEvent: " + action;
		} 

	}
}